Skip to content

fix(html): hint when custom theme uses unknown Handlebars helpers (#2834)#3111

Closed
leno23 wants to merge 5 commits into
rust-lang:masterfrom
leno23:fix/theme-fa-helper-hint-2834
Closed

fix(html): hint when custom theme uses unknown Handlebars helpers (#2834)#3111
leno23 wants to merge 5 commits into
rust-lang:masterfrom
leno23:fix/theme-fa-helper-hint-2834

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

When a custom theme/index.hbs references built-in helpers (fa, toc, resource) but the build fails with Handlebars "Helper not found", append actionable guidance: copy templates from the same mdBook version used to build (e.g. via mdbook init), not from a different release or branch.

This addresses confusion in #2834 where copying index.hbs from source/docs without matching the installed mdBook version produced an opaque error.

Fixes #2834

Test plan

  • cargo test -p mdbook-html render_hint
  • cargo test -p mdbook --test testsuite theme::
  • CI

When rendering fails with "Helper not found" (e.g. `fa` from a theme
index.hbs copied from a newer mdBook), append guidance to copy templates
from the same mdBook version used to build.

Fixes rust-lang#2834

Co-authored-by: Cursor <cursoragent@cursor.com>
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 17, 2026
wuyangfan and others added 4 commits May 17, 2026 13:07
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@ehuss ehuss closed this May 23, 2026
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helper not found fa

3 participants